﻿using DDDSystem.Application.Contracts;
using DDDSystem.Domain;
using DDDSystem.Domain.Entities;
using DDDSystem.Domain.Shared;
using DDDSystem.EntityFrameworkCore;

namespace DDDSystem.Application;

/// <summary>
/// 基础字典服务
/// </summary>
public class BasicDictionaryService : IBasicDictionaryService
{
    private IBasicDictionaryRepository _basicDictionaryRepository;

    public BasicDictionaryService(IBasicDictionaryRepository basicDictionaryRepository)
    {
        _basicDictionaryRepository = basicDictionaryRepository;
    }

    /// <summary>
    /// 查询基础字典
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    public IList<BasicDictionary> Get(BasicDictionaryType type)
    {
        return _basicDictionaryRepository.Get(type);
    }
}

